package com.foreknow.oopTest.book;

import java.util.Scanner;

/**
 * @author shkstart
 * @create 2021-07-26 9:56
 */
public class Test {
    Scanner sc=new Scanner(System.in);
    public static void main(String[] args) {
        Book[] books=new Book[3];
        Book book1 = new Book(1, "java", 33.45, 50);
        Book book2 = new Book(2, "jsp", 55.45, 150);
        Book book3 = new Book(3, "ssm", 77.45, 250);
        books[0]=book1;
        books[1]=book2;
        books[2]=book3;
        Test test=new Test();
        test.show(books);
    }

    public void show(Book[] books){
        for (Book b:books) {
            System.out.println(b.getBid()+"\t"+b.getBookname()+"\t"+b.getPrice()+"\t"+b.getNum());
        }

    }


    public void buyBook(){
        for (int i = 0; i <3; i++) {
            System.out.println("请输入购买图书编号");
            sc.nextInt();
        }

    }
}
